home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1994 November / macformat-018.iso / Utility Spectacular / Script / ScriptKey folder / About ScriptKey next >
Encoding:
Text File  |  1994-06-10  |  3.7 KB  |  26 lines  |  [TEXT/ttxt]

  1. ScriptKey is an FKEY for executing AppleScript scripts. To install it, use your favourite FKEY installation tool. You may use ResEdit (I do), but be careful when ResEditing your current System file. As with any FKEY, its single-digit resource ID number corresponds to the key you hit to invoke it: thus, if you give it ID 5, then you invoke it by hitting command-shift-5.
  2.  
  3. The scripts themselves are kept in a file called “ScriptKey Scripts”, which goes in your Preferences folder. I haven’t provided any tools for creating or manipulating this file, so you’ll have to do it with ResEdit. Each script is stored in an “scpt” resource; to get one of these, create the script as you normally do using the AppleScript Script Editor, and save it as a compiled script. Open the saved script file with ResEdit, copy the “scpt” resource you find in there, and paste it into ScriptKey Scripts. Simple. Keep the original script file around, in case you want to make further changes to the script.
  4.  
  5. Inside ScriptKey Scripts, the “scpt” resources are identified by name or number. You can use ResEdit’s “Get Resource Info” command to rename and renumber the script resources. Numbers can’t be negative, and names can’t consist entirely of digits (otherwise I couldn’t tell them from numbers), but otherwise you can use pretty much whatever names you are willing to type.
  6.  
  7. To actually use ScriptKey, invoke it by typing the command-shift-n sequence, where n was the single-digit resource ID you gave it when you installed it. If all goes well, you will hear a click. Next you type the name or number of the script you want to invoke. You will hear a click on each keystroke, to remind you that ScriptKey is reading your keystrokes. When typing a name, you don’t have to put in the entire name; just enough of it to unambiguously identify the script. Finish by pressing return or enter. If ScriptKey finds a script with the name or number you specified, you will hear a beep, then your script will execute. If anything went wrong, you will hear a raspberry sound.
  8.  
  9. If you invoke ScriptKey and then change your mind, or you make a mistake while entering the script name or number, press the delete key (escape or command-dot also work). You will hear a raspberry, and ScriptKey will exit.
  10.  
  11. Note: if your system volume is set to zero, naturally you won’t hear any of the audible feedback. Just thought I’d point this out.
  12.  
  13. Trivia note: the name of the ScriptKeys Scripts file is actually determined from the name of the FKEY itself. This may not seem very significant, except you could install two copies of the FKEY in your System file, call the second one, say, “More ScriptKeys”, and that one will automatically look in a file called “More ScriptKeys Scripts” for its scripts. Just thought I’d point this out, too.
  14.  
  15. Yet another note: Sometimes, immediately after ScriptKey beeps to let you know it’s going to execute a script, your machine may seem to hang. You can still move the mouse pointer around, but there is no response to keystrokes or mouse clicks. Don’t panic—yet. What is probably happening is that the system is trying to send an AppleEvent, and not succeeding, and it can take up to two minutes for it to timeout and give up. Once it does, ScriptKey will get the error, and will blow its usual raspberry let you know. One way to trigger this condition is to try to use ScriptKey when the active application is not AppleEvent-aware.
  16.  
  17. That’s all there is to it. I think the software is fairly safe to use, but I can’t guarantee it. If you hit any problems, let me know, and I’ll do my best to fix them, but basically it’s use at your own risk.
  18.  
  19. Lawrence D’Oliveiro
  20. Information & Technology Services Division
  21. University of Waikato
  22. Private Bag
  23. Hamilton
  24. New Zealand
  25. Internet: ldo@waikato.ac.nz
  26. 1994 June 10